package com.sfac.springBoot.modules.test.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sfac.springBoot.modules.common.entity.AbstractEntity;

import javax.persistence.*;

/**
 * @Description Card
 * @Author HymanHu
 * @Date 2022/7/1 13:44
 */
@Entity
@Table(name = "test_card")
public class Card extends AbstractEntity {

	private String cardNo;

	@OneToOne(mappedBy = "card", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JsonIgnore
	private Student student;

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}
}
